//
// Created by Zhangwj on 2023/9/27.
//

#ifndef COMPILE_TASK2_IFSTMTITEMNODE_H
#define COMPILE_TASK2_IFSTMTITEMNODE_H


#include "StmtItemNode.h"
#include "../../Parser.h"
#include "../CondNode.h"

class IfStmtItemNode : public StmtItemNode {
public:
    // 'if' '(' Cond ')' Stmt [ 'else' Stmt ]
    std::unique_ptr<CondNode> Cond;
    std::unique_ptr<StmtNode> Stmt;
    std::unique_ptr<StmtNode> ElseStmt;

    static std::unique_ptr<IfStmtItemNode> IfStmtItemParser(Parser &parser);
};


#endif //COMPILE_TASK2_IFSTMTITEMNODE_H
